package com.bltec.emergency.service.mgrService.impl;

import com.bltec.emergency.mapper.RolePermissionMapper;
import com.bltec.emergency.model.RolePermission;
import com.bltec.emergency.service.mgrService.RolePermissionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class RolePermissionImpl implements RolePermissionService {
    @Resource
    RolePermissionMapper rolePermissionMapper;

    @Override
    public boolean addPermission(RolePermission rolePermission) {
        return rolePermissionMapper.save(rolePermission);
    }

    @Override
    public boolean deleteByRoleId(Long roleId) {
        return rolePermissionMapper.deleteByRoleId(roleId);
    }
}
